package com.gec.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.gec.pojo.Article;

public interface ArticleMapper {

	public List<Article> getArticleByPage(@Param("typecode") String typecode, @Param("keyword") String keyword, @Param("start") int start, @Param("pageSize") int pageSize);

	public int getArticleCount(@Param("typecode") String typecode,@Param("keyword") String keyword);

	public Article getArticleById(int id);

	public List<Article> getArticles();

	public List<Article> getArticleByType(@Param("typecode") String string);

	public void postArticle(@Param("title") String title,@Param("text") String text,@Param("name") String name, @Param("typecode")String typecode);

	public void deleteArticle(int aid);

	public Article getNewestArticle();

	public void updateArticle(@Param("aid") int aid,@Param("title") String title,@Param("text") String text);

	public List<Article> getArticleByName(String name);

}
